<template>
  <el-form ref="form" :model="form" label-width="120px">
    <el-form-item label="结果类型：">
      <el-radio-group v-model="form.resultType">
        <el-radio label="1">完成</el-radio>
        <el-radio label="0">退回</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="处置结果：" v-if="form.resultType == '1'">
      <el-input type="textarea" :rows="2" placeholder="请输入处置结果" v-model="form.handleResult">
      </el-input>
    </el-form-item>
    <el-form-item label="处置图片：" v-if="form.resultType == '1'">
      <ImageUpload v-model="form.handlePics"></ImageUpload>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">提交</el-button>
    </el-form-item>
  </el-form>
</template>
<script>
export default {
  data() {
    return {
      form: {
        resultType: '1'
      },
    };
  },
  methods: {
    onSubmit() {
      this.$refs["form"].validate(async (valid) => {
        if (valid) {
          this.$emit("submit", this.form);
        }
      });
    },
    onChangeGroup(data) {
      this.$set(this.form, "handlerDeptName", data.name);
      console.log(this.form);
    },
  },
};
</script>